﻿//fs
//#version 150

//uniform vec4 color = vec4(1, 0, 0, 1); // default: red color.
uniform sampler1D tex;

in vec3 passPos;

out vec4 outColor;

void main() {
    float passTexCoord = (sqrt(passPos.x * passPos.x + passPos.y * passPos.y + passPos.z * passPos.z) - 0.5) / (sqrt(0.5 * 0.5 * 3) - 0.5);
    outColor = texture(tex, passTexCoord);
}